package javacommon.util;

import java.util.HashMap;
import java.util.Map;

public class ResInfo {
	private String error_title;
	private boolean result;
	private boolean is_need_login;
	private int error_type;
	private String error_message;
	private String param;
	
	

	public static Map<String, Object> getResInfo(boolean result,boolean is_need_login,int error_type,String error_message){
		Map<String, Object> resInfo = new HashMap<String, Object>();
		resInfo.put("error-title", "");
		resInfo.put("result", result);
		resInfo.put("is-need-login", is_need_login);
		resInfo.put("error-type", error_type);
		resInfo.put("error-message", error_message);
		resInfo.put("param", "");
		return resInfo;
	}
	
	public static Map<String, Object> getResInfo(String error_title,boolean result,boolean is_need_login,int error_type,String error_message,String param){
		Map<String, Object> resInfo = new HashMap<String, Object>();
		resInfo.put("error-title", error_title);
		resInfo.put("result", result);
		resInfo.put("is-need-login", is_need_login);
		resInfo.put("error-type", error_type);
		resInfo.put("error-message", error_message);
		resInfo.put("param", param);
		return resInfo;
	}
	
	public String getError_message() {
		return error_message;
	}
	public void setError_message(String error_message) {
		this.error_message = error_message;
	}
	public String getError_title() {
		return error_title;
	}
	public void setError_title(String error_title) {
		this.error_title = error_title;
	}
	public int getError_type() {
		return error_type;
	}
	public void setError_type(int error_type) {
		this.error_type = error_type;
	}
	public boolean isIs_need_login() {
		return is_need_login;
	}
	public void setIs_need_login(boolean is_need_login) {
		this.is_need_login = is_need_login;
	}
	public String getParam() {
		return param;
	}
	public void setParam(String param) {
		this.param = param;
	}
	public boolean isResult() {
		return result;
	}
	public void setResult(boolean result) {
		this.result = result;
	}
	
	
}
